<?php
namespace zake\foundation\reactor\trigger;

use zake\foundation\able\reactor\ChannelAble;
use zake\foundation\able\BeeAble;
use zake\foundation\able\stream\DuplexDriverAble;
use zake\foundation\able\traits\BeeTrait;
use zake\foundation\stream\DuplexStream;


/**
 * Class Channel
 * @package zake\foundation\channel
 *
 * 不支持：
 *  -- getFd()          -> 0
 *  -- getResource()    -> null
 *
 * 负责父子间进程通信，使用socket_pair 或 pipe 通信
 *
 */
class Channel extends DuplexStream implements ChannelAble,BeeAble
{
    use BeeTrait;


    protected $connectId;

    /**
     * 构造器
     *
     * Channel constructor.
     * @param DuplexDriverAble $driver
     */
    protected function __construct(DuplexDriverAble $driver)
    {
        parent::__construct($driver);
    }


    public function getConnectId()
    {
        return $this->connectId;
    }

    public function setConnectId($connectId)
    {
        $this->connectId = $connectId;
    }
}
